
/**
 * 手机码验证
 * */
export const isphone = function (phone) {
  let reg = /^(?:13\d|14\d|15\d|17\d|18\d)\d{8}$/
  return reg.test(phone)
}

/**
  * 邮箱验证
   * */
export const isEmail = function (email) {
  let reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/
  return reg.test(email)
}

/**
 * 身份证验证
 */
export const isIdCrad = function (idcrad) {
  let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
  return reg.test(idcrad)
}
